from django.contrib import admin
from django.urls import path
from user.views import LoginView, Register
from django.urls import path, include
from user.urls import urlpatterns as user_urls
from Message.urls import urlpatterns as message_urls
from user.views import ChangeRoleView
from role.views import RoleViewSet
from user import views
from usermanage import urls as um_urls
from role.views import RoleViewSet
from permissions.views import AddPermissions
from zhineng.urls import urlpatterns as zh_urls
from notifications.urls import urlpatterns as notifications_urls
from ask_for_leave.urls import urlpatterns as ask_for_leave_urls
from zhineng.views import SeeView, EditView, AddCollege
from zhineng.views import SeeView, EditView, AddCollege
from cteacher.urls import urlpatterns as cteacher_urls

from answer.urls import urlpatterns as answer_urls

from examination.urls import urlpatterns as examination_urls


urlpatterns = [
    path('admin/', admin.site.urls),
    path('register/', Register.as_view()),
    path('login/', LoginView.as_view()),
    path('user/', include(user_urls)),
    path('info/', include(message_urls)),
    path('getpermissions/<int:id>', RoleViewSet.as_view()),
    path('usermanage/<int:id>/', views.UsermanageModel.as_view()),
    path('change_user/<id>/', ChangeRoleView.as_view()),
    path('userinfo/', views.UserInfoView.as_view()),
    path('permission_manage/', AddPermissions.as_view()),
    path('permission_manage/<id>/', AddPermissions.as_view()),
    path('um/', include(um_urls)),
    path('notifications/', include(notifications_urls)),
    path('usermanage/', views.UsermanageModel.as_view()),
    path('userinfo/', views.UserInfoView.as_view()),
    path('getpermissions/<int:id>', RoleViewSet.as_view()),
    path('cteacher/', include(cteacher_urls)),
    path('examination/', include(examination_urls)),
    path('zhineng/', include(zh_urls)),
    path('leave/', include(ask_for_leave_urls)),
    path('answer/', include(answer_urls))
]
